package gui;

import org.uqbar.commons.utils.Observable;

import aOrganizar.Reserva;
import aOrganizar.ReservaManager;

@Observable
public class MensajeReserva
{
	private Reserva 	   reserva;
	private ReservaManager reserva_manager;
	
	public MensajeReserva()
	{
		this.reserva_manager = ReservaManager.getInstance();		
	}
	
	public void setReserva(Reserva reserva)
	{
		this.reserva = reserva;
	}
	
	public Reserva getReserva()
	{
		return this.reserva;		
	}
	
	public ReservaManager  getReserva_manager()
	{
		return this.reserva_manager;		
	}
	
	public boolean Reservar()
	{
		Reserva resu = 	this.reserva_manager.reservar(this.reserva.getAsiento(), this.reserva.getUsuario());
					
		return (resu!=null);
	}
}
